<!DOCTYPE html>
<html>
  <head>
    <title>login.html</title>
    <meta name="keywords" content="keyword1,keyword2,keyword3">
    <meta name="description" content="this is my page">
    <meta name="content-type" content="text/html; charset=UTF-8">
 
  </head>
   
  <body>
    <div ng-app="" ng-controller="formController">
        登陆模块     
        <form action="">
            <div>姓名:<input name="name" ng-model="current.name"/></div>
            <div>密码:<input name="pass" ng-model="current.pass"/></div>
            <p ng-bind="current.name + current.pass"></p>
            <div> 
            <button ng-click="commit()">commit</button>
            </div>
        </form>
    </div>
    <script src="http://apps.bdimg.com/libs/angular.js/1.4.0-beta.4/angular.min.js"></script>
    <script>
        function formController($scope, $http) {
            $scope.commit = function() {
                $http({
                    method:"POST",
                    url:"/user/login", 
                    params:{
                        "useruame":$scope.current.name,
                        "password":$scope.current.pass
                    }
                }).success(function(data) {
                    console.log("success...");
                }).error(function() {
                    alert("fail...");
                });
             
            };
        };
    </script> 
</body> 
</html>